package com.ordertracker.persistent.dictionary;

import com.ordertracker.persistent.dictionary.template.AbstractUserTemplate;

import javax.persistence.*;
import java.security.Principal;

/**
 * Description of class.
 * Created 12/14/12 2:02 PM
 *
 * @author andrey.rodin@playtech.com
 */

@Entity
public class User extends AbstractUserTemplate implements Principal {
    private static final long serialVersionUID = -319677037737203836L;

    @ManyToOne(optional = false)
    private Role role;

    @ManyToOne(optional = false)
    private Person person;

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }
}
